class PageList extends React.Component {
  render() {
    const {pageNo,pageSum,getCommon} = this.props
    const arr = []
    for(let i = 0;i<pageSum;i++){
        arr.push(<a key={i} onClick={e=>{
            e.preventDefault()
            getCommon(i+1)
        }} href="" className={pageNo===i+1? 'active':''}>{i+1}</a>)
    }
    return (
        <div className="page">
        {
            arr
        }
    </div>
    )
  }
}
